package com.bye.controller;

import com.bye.service.OrderService;
import com.bye.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @RequestMapping("/countAmount")
    public Result countAmount() {
        String countAmount = orderService.countAmount();
        return Result.success(countAmount);
    }

    @RequestMapping("/countOrders")
    public Result countOrders() {
        String countOrders = orderService.countOrders();
        return Result.success(countOrders);
    }
}
